-
Notifications
You must be signed in to change notification settings - Fork 28
Add flashtestations integration tests #283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
46380ae
to
41c42bf
Compare
c5355b4
to
a84c2bc
Compare
41c42bf
to
01573b2
Compare
a84c2bc
to
3757a28
Compare
01573b2
to
32146ac
Compare
3757a28
to
525f5da
Compare
32146ac
to
2499332
Compare
3997fe0
to
260cb95
Compare
11f6b6a
to
5787983
Compare
260cb95
to
2bd3b66
Compare
β¦tegration-tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds full flashtestations integration support: contract deployment utilities, builder transaction logic (funding, registration, block proof), an in-test attestation server, and end-to-end integration tests. Also broadens the payload builder context API and introduces new test constants/signers.
- Introduces FlashtestationsBuilderTx with registration and block proof flows.
- Adds integration tests covering registration, block proofs, and interaction with flashblock number contract.
- Expands OpPayloadBuilderCtx method visibility and adds an in-process mock attestation HTTP server for tests.
Reviewed Changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 20 comments.
Show a summary per file
File | Description |
---|---|
crates/op-rbuilder/src/tests/mod.rs | Registers new flashtestations test module and adds test addresses. |
crates/op-rbuilder/src/tests/framework/utils.rs | Adds deployment/init helpers, workload addition, signer selection adjustments, and fixes a typo in a method name. |
crates/op-rbuilder/src/tests/framework/mod.rs | Adds new signer keys and flashtestations constants. |
crates/op-rbuilder/src/tests/framework/instance.rs | Adds mock attestation server lifecycle and accessors. |
crates/op-rbuilder/src/tests/framework/artifacts/genesis.json.tmpl | Funds additional test accounts. |
crates/op-rbuilder/src/tests/flashtestations.rs | New integration tests for registration, block proofs, and number contract interaction. |
crates/op-rbuilder/src/tests/flashblocks.rs | Switches to shared FLASHBLOCKS_NUMBER_ADDRESS constant and removes unused imports. |
crates/op-rbuilder/src/flashtestations/service.rs | Refactors service to use new builder_tx module and passes builder policy address. |
crates/op-rbuilder/src/flashtestations/mod.rs | Adds LogMismatch revert reason and exports builder_tx module. |
crates/op-rbuilder/src/flashtestations/builder_tx.rs | Implements Flashtestations builder transaction logic (funding, registration, block proof). |
crates/op-rbuilder/src/flashtestations/attestation.rs | Improves log message clarity for remote quote fetching. |
crates/op-rbuilder/src/builders/standard/builder_tx.rs | Updates import path for FlashtestationsBuilderTx. |
crates/op-rbuilder/src/builders/flashblocks/builder_tx.rs | Uses new BuilderTransactionError::other helper for clearer error construction. |
crates/op-rbuilder/src/builders/context.rs | Makes previously module-private builder context accessors public. |
crates/op-rbuilder/src/builders/builder_tx.rs | Adds helper constructor for Other variant of BuilderTransactionError. |
crates/op-rbuilder/Cargo.toml | Adds HTTP server dependencies for testing profile. |
README.md | Updates flashtestations run example flags. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
impl Drop for AttestationServer { | ||
fn drop(&mut self) { | ||
if let Some(tx) = self.shutdown_tx.take() { | ||
let _ = tx.send(()); | ||
} | ||
tracing::info!("AttestationServer dropped, terminating server"); | ||
} |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dropping only signals shutdown without awaiting the server task; the listener may still accept connections briefly, leading to potential race conditions or port reuse issues. Consider storing the JoinHandle and awaiting it in an async shutdown path or joining in a separate background task to ensure orderly termination.
Copilot uses AI. Check for mistakes.
Co-authored-by: Copilot <[email protected]>
π Summary
Add test utils for deploying flashtestation contracts (using the mock quote contract) and integration tests.
π‘ Motivation and Context
β I have completed the following steps:
make lint
make test